#ifndef CHECKOUTDATA_H
#define CHECKOUTDATA_H
#include "BaseData.h"

struct CheckOutPcuInfo
{
    std::string locationNo;
    std::string pcu;
    std::string gear;
    std::list<std::string> ngCodeList;
};

class CheckoutData
{
public:

    void setBatch(const std::string& batch){this->batch = batch;}

    void setPcuInfo(const std::list<CheckOutPcuInfo>& pcuInfo)
    {
        for(const auto& item:pcuInfo)
        {
            this->pcuInfo.push_back(item);
        }
    }

    std::list<CheckOutPcuInfo> getPcuInfo()const {return this->pcuInfo;}


    void setLocationNo(const std::string& locationNo){this->locationNo=locationNo;}
    void setPcu(const std::string& pcu) {this->pcu=pcu;}
    void setGear(const std::string& gear){this->gear = gear;}

    void setNgCodeList(const std::list<std::string>& ngCodeList){
        for(const auto& item:ngCodeList){
            this->ngCodeList.push_back(item);
        }
    }

    std::string getBatch()const {return batch;}
    std::string getLocationNo()const {return locationNo;}
    std::string getPcu()const {return pcu;}
    std::string getGear()const {return gear;}
    std::list<std::string> getNgCodeList()const {return ngCodeList;}


private:
    friend class BaseData<CheckoutData>;

    CheckoutData()=default;

    std::string batch;
    std::list<CheckOutPcuInfo> pcuInfo;


    std::string locationNo;
    std::string pcu;
    std::string gear;
    std::list<std::string> ngCodeList;

};

#endif // CHECKOUTDATA_H
